package com.qf.smsplatform.webmaster.mapper;

import com.qf.smsplatform.webmaster.pojo.TMenu;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface MenuMapper {
    @Select("select * from t_menu")
    List<TMenu> findAllMenus();

    @Select("SELECT * from t_menu where id in (SELECT menu_id from t_role_menu where role_id in (SELECT role_id from t_user_role where user_id = #{userid}) )")
    List<TMenu> findAllMenusByUserId(Long userid);
}
